#import <UIKit/UIKit.h>

IB_DESIGNABLE

@interface YLTextField : UITextField

// 圆角弧度
@property (nonatomic,assign) IBInspectable CGFloat cornerRadius;
// 边框宽度
@property (nonatomic,assign) IBInspectable CGFloat borderWidth;
// 边框颜色
@property (nonatomic,copy) IBInspectable UIColor *borderColor;
// 圆形化
@property (nonatomic,assign) IBInspectable BOOL isRound;

// 占位文字大小
@property (nonatomic,assign) IBInspectable NSUInteger placeFont;
// 占位文字颜色
@property (nonatomic,copy) IBInspectable UIColor *placeColor;
// 输入框的最大长度
@property (assign, nonatomic) IBInspectable NSUInteger max;
// 点击return按钮后自动回收
@property (assign, nonatomic) IBInspectable BOOL resignReturn;

// 仅可输入手机号
@property (nonatomic,assign) BOOL isMoblie;
// 仅可输入验证码
@property (nonatomic,assign) BOOL isVerificationCode;
// 仅可输入密码
@property (nonatomic,assign) BOOL isPayWord;
// 仅可输入购买数量
@property (nonatomic,assign) BOOL isBuyNumber;
// 仅可输入价格，数字+小数点
@property (nonatomic,assign) BOOL isPrice;
// 不限制类型的输入框
@property (nonatomic,assign) BOOL isNormal;
// 校验输入框合法性
@property (nonatomic,assign) BOOL isAvailable;

// 结束编辑后回调
@property (nonatomic, copy) void(^didEndEditingBlock)(YLTextField *);
// 用户点击了Return按钮的回调 常用于 搜索 功能
@property (nonatomic, copy) BOOL(^shouldReturnBlock)(YLTextField *);
// 用户点击了Clear按钮的回调
@property (nonatomic, copy) BOOL(^shouldClearBlock)(YLTextField *);


@property (nonatomic, copy) BOOL(^shouldBeginEditingBlock)(YLTextField *);
@property (nonatomic, copy) void(^didBeginEditingBlock)(YLTextField *);
@property (nonatomic, copy) BOOL(^shouldEndEditingBlock)(YLTextField *);
@property (nonatomic, copy) BOOL(^shouldChangeCharactersInRangeWithReplacementStringBlock)(YLTextField *, NSRange, NSString *);


@end
